home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume6 / emxhelp / part01 next >
Encoding:
Text File  |  1990-04-25  |  21.0 KB  |  810 lines

  1. Path: uunet!lll-winken!sun-barr!newstop!sun!iris.ucdavis.edu
  2. From: lee@iris.ucdavis.edu (Peng Lee)
  3. Newsgroups: comp.sources.x
  4. Subject: REPOST: v06i080: X-emacs-helper, Part01/01
  5. Message-ID: <134817@sun.Eng.Sun.COM>
  6. Date: 25 Apr 90 17:36:17 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 799
  9. Approved: argv@sun.com
  10.  
  11. Submitted-by: lee@iris.ucdavis.edu (Peng Lee)
  12. Posting-number: Volume 6, Issue 80
  13. Archive-name: emxhelp/part01
  14.  
  15. [ Moderator's note: this didn't seem to get posted to several places. ]
  16.  
  17. Greeting:
  18.     I hope you will enjoy this small program I wrote.
  19.  
  20.     When you push a button, ECS-x and the button-label string will be send
  21. to the emacs window in you screen.
  22.  
  23.  
  24. -----Cut Here----
  25. #!/bin/sh
  26. # to extract, remove the header and type "sh filename"
  27. if `test ! -s ./Makefile`
  28. then
  29. echo "writing ./Makefile"
  30. cat > ./Makefile << '\End\Of\Shar\'
  31. DEST          = .
  32.  
  33. HDRS          = 
  34.  
  35. CFLAGS          = -g
  36.  
  37.  
  38. #  you need to reconfig this if this file your Xm Xt is in the wrong place.
  39.  
  40. INCLUDE       = -I$(HOME)/x11/motif/lib/Xt -I$(HOME)/x11/motif/lib/
  41.  
  42. LIBDIR           = $(HOME)/x11/motif/lib/
  43.  
  44. LIBS          = $(LIBDIR)./Xm/libXm.a $(LIBDIR)./Xt/libXt.a -lX11
  45.  
  46. CC          = gcc
  47.  
  48. MAKEFILE      = Makefile
  49.  
  50. OBJS          = x_emacs_helper.o 
  51.  
  52. PRINT          = pr
  53.  
  54. SRCS          = x_emacs_helper.c 
  55.  
  56. all:        x_emacs_helper
  57.  
  58. x_emacs_helper:    $(SRCS) x_emacs_helper.h
  59.         $(CC) $(CFLAGS) $(INCLUDE) x_emacs_helper.c  $(LIBS) -o x_emacs_helper
  60.  
  61.  
  62. l:        menu.l 
  63.         lex menu.l
  64.         gcc -g lex.yy.c -o l -ll
  65.  
  66.  
  67.  
  68. clean:;        @rm -f $(OBJS)
  69.  
  70. depend:;    @mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)
  71.  
  72. index:;        @ctags -wx $(HDRS) $(SRCS)
  73.  
  74. install:    $(PROGRAM)
  75.         @echo Installing $(PROGRAM) in $(DEST)
  76.         @install -s $(PROGRAM) $(DEST)
  77.  
  78. print:;        @$(PRINT) $(HDRS) $(SRCS)
  79.  
  80. program:        $(PROGRAM)
  81.  
  82. tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
  83.  
  84. update:        $(DEST)/$(PROGRAM)
  85.  
  86. $(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS) $(EXTHDRS)
  87.         @make -f $(MAKEFILE) DEST=$(DEST) install
  88.  
  89.  
  90. \End\Of\Shar\
  91. else
  92.   echo "will not over write ./Makefile"
  93. fi
  94. if `test ! -s ./README`
  95. then
  96. echo "writing ./README"
  97. cat > ./README << '\End\Of\Shar\'
  98. This directory contains these files:
  99.  
  100.     README :  This file.
  101.  
  102.     emacs_com.h : headers file for emacs_com.h
  103.  
  104.     emacs_com.c : the program
  105.  
  106.     Makefile    : makefile for building the program.
  107.  
  108.  
  109.  
  110.  
  111.     This program will search through the X window
  112. hierarchy for a emacs window.  It then setup a list of
  113. buttons contain the commands from M-x SPACE.  When one of
  114. the buttons is pushed, the ECS-x "command" keystrokes will be
  115. send to the emacs window.
  116.  
  117.     This program is good as a emacs tutorial. It also
  118. works fine for those who didn't want to remember the 400
  119. "basic" emacs commands, or key-stroke. (me)
  120.  
  121.  
  122. To make the program:
  123.  
  124.     motified the INCLUDE and LIBDIR macro definitions in 
  125. the Makefile.
  126.  
  127.     Type "make"
  128.  
  129.  
  130. ToDo:
  131.     
  132.     I am currently working on a version that  lets the
  133. users config their own buttons and actions.  
  134.  
  135.     The Cap letter does not work.
  136.  
  137.     Use Athena widget instead of motif would be better
  138. for the memory.   It is a 800k byte program - as big as mwm.
  139.  
  140.  
  141.  
  142.  
  143. Enjoy it.
  144.  
  145.  
  146. -Peng
  147.  
  148. p.s  By the way:
  149.     I will graduate in June 1990.  I entertain any job
  150. offer, and it doesn't have to relate to X-window, or motif.
  151. I have strong background (educational, internship) in system
  152. and embedded controller firmware.  So, if you (or you
  153. company) like the program and in need of a programmer with
  154. strong background in hardware and software.  Please send
  155. mail to lee@iris.ucdavis.edu, and I will send you my resume.     
  156.  
  157. \End\Of\Shar\
  158. else
  159.   echo "will not over write ./README"
  160. fi
  161. if `test ! -s ./x_emacs_helper.c`
  162. then
  163. echo "writing ./x_emacs_helper.c"
  164. cat > ./x_emacs_helper.c << '\End\Of\Shar\'
  165. /*
  166.  *
  167.  * Emacs X Menu with motif widget.
  168.  *
  169.  *
  170.  *  By Peng Lee
  171.  *  lee@iris.ucdavis.edu
  172.  *
  173.  *
  174. */
  175.  
  176.  
  177. #include <stdio.h>
  178. #include <string.h>
  179. #include <ctype.h>
  180.  
  181. #include <X11/Intrinsic.h>
  182. #include <X11/IntrinsicP.h>
  183. #include <X11/CoreP.h>
  184. #include <X11/Shell.h>
  185. #include <Xm/Xm.h>
  186. #include <Xm/BulletinB.h>
  187. #include <Xm/CascadeB.h>
  188. #include <Xm/Frame.h>
  189. #include <Xm/Label.h>
  190. #include <Xm/MainW.h>
  191. #include <Xm/MessageB.h>
  192. #include <Xm/PushB.h>
  193. #include <Xm/PushBG.h>
  194. #include <Xm/RowColumn.h>
  195. #include <Xm/ScrollBar.h>
  196. #include <Xm/ScrolledW.h>
  197.  
  198.  
  199. #define XK_MISCELLANY
  200. #define XK_LATIN1
  201. #include <X11/keysymdef.h>
  202.  
  203. #define EMACS "emacs"
  204. Display *dsp;
  205. int scr;
  206. Window win, des_w;  
  207.  
  208. FILE
  209.   *fd; 
  210. static XmStringCharSet  charset = (XmStringCharSet) XmSTRING_DEFAULT_CHARSET;
  211.  
  212. #define MAX_ARGS 10
  213.  
  214. #include "x_emacs_helper.h"
  215. /* char *emacs_com[]  = { "undo", "repl reg", NULL }; */
  216.  
  217. void main();
  218.  
  219. Widget CreateMainWindow();  /* create main window */
  220. Widget CreateCommandList(); /* create command dispay window */
  221.  
  222. void SelectEmacsCommand();  /* callback for emacs send command*/
  223. void SelectEmacsString();   /* callback for emacs send string */
  224. void Quit();                /* callback for Quit */
  225.  
  226. void SendString();
  227. void SendCommand();
  228.  
  229.  
  230. #define TITLE_STRING "X Emacs Command Helper"
  231.  
  232.  
  233.  
  234. void main(argc, argv)
  235.      unsigned int argc;
  236.      char **argv;
  237.  
  238. {
  239.  
  240.   Widget     app_shell, main_window;
  241.   
  242.   /* if it can't open the file there is not need for file pointer 
  243.  
  244.   if ( (fd = fopen("emacs.com","r") ) == NULL ) {
  245.     fprintf(stderr, "can't open the file emacs.com \n");
  246.     exit(1)
  247.     };
  248. */
  249.   
  250.   XtToolkitInitialize();
  251.   dsp = XtOpenDisplay (NULL, NULL, TITLE_STRING,  TITLE_STRING, NULL, 0,
  252.                 &argc, argv);
  253.  
  254.   if (!dsp) {
  255.     XtWarning ("%s: Can't open display, exit now");
  256.     exit(1);
  257.   }
  258.   scr = DefaultScreen(dsp); 
  259.  
  260.   app_shell = XtAppCreateShell (TITLE_STRING, "Emacs Helper",
  261.                 applicationShellWidgetClass, dsp, NULL, 0);
  262.   
  263.   main_window = CreateMainWindow (app_shell);
  264.   XtRealizeWidget (app_shell);
  265.   
  266.   get_emacs_win();
  267.   XtMainLoop();
  268.  
  269. }
  270.  
  271.  
  272. Widget CreateMainWindow(parent)
  273.      Widget   parent;
  274. {
  275.   Widget     
  276.     main_window,
  277.     row_column,         /* RowColumn */
  278.     button,             /* PushButtonGadget */
  279.     frame,              /* Frame for the window */
  280.     swindow,            /* Scroll Bar window */
  281.     hsb, vsb;           /* ScrollBars */
  282.   Arg
  283.     args[MAX_ARGS];
  284.  
  285.   XmString
  286.     label_string;
  287.  
  288.  
  289.   register int
  290.     n = 0 ,
  291.     i = 0 ;
  292.   
  293.  
  294.  
  295.   main_window = XmCreateMainWindow (parent, "main1", args, n);
  296.   
  297.   XtManageChild (main_window);
  298.  
  299.   n = 0;
  300.   XtSetArg(args[n], XmNmarginWidth, 2);
  301.  
  302.  
  303.   n++;
  304.   XtSetArg(args[n], XmNmarginHeight, 2);  n++;
  305.   XtSetArg(args[n], XmNshadowThickness, 1);  n++;
  306.   XtSetArg(args[n], XmNshadowType, XmSHADOW_OUT);  n++;
  307.   frame = XmCreateFrame (main_window, "frame", args, n) ;
  308.   XtManageChild (frame);
  309.   
  310.   n = 0;
  311.   XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAS_NEEDED);  n++;
  312.   XtSetArg(args[n], XmNscrollingPolicy, XmAUTOMATIC);  n++;
  313.   swindow = XmCreateScrolledWindow (frame, "swindow", args, n);
  314.   XtManageChild (swindow);
  315.  
  316.   n = 0;
  317. /*  XtSetArg (args[n], XmNpacking, Xm_PACK_TIGHT);  n++;  */
  318.   XtSetArg (args[n], XmNnumColumns, 5);  n++;
  319.   row_column = XmCreateRowColumn (swindow, "row_column", args, n);
  320.   XtManageChild (row_column);
  321.  
  322. /*  XmMainWindowSetAreas (main_window, menu_bar, NULL, NULL, NULL,
  323.             frame);
  324. */
  325.   n = 0;
  326.   XtSetArg (args[n], XmNhorizontalScrollBar, &hsb);  n++;
  327.   XtSetArg (args[n], XmNverticalScrollBar, &vsb);  n++;
  328.   XtGetValues (main_window, args, n);
  329.   XmAddTabGroup (row_column);
  330.   if (hsb)
  331.     XmAddTabGroup (hsb);
  332.   if (vsb)
  333.     XmAddTabGroup (vsb);
  334.  
  335.  
  336.   /* Create a Quit Button */
  337.   n = 0;
  338.   label_string = XmStringCreateLtoR("QUIT EMACS HELPER", charset);
  339.   XtSetArg (args[n], XmNlabelString, label_string);  n++;
  340.   button = XmCreatePushButtonGadget (row_column, "QUIT", args, n);
  341.   XtManageChild (button);
  342.   
  343.   /* callback for emacs command send */
  344.   
  345.   XtAddCallback (button, XmNarmCallback,Quit, NULL);
  346.  
  347.  
  348.   /* Creat a button for each comand */
  349.   for ( i =0; emacs_com[i] != NULL ; i++ ) {
  350.     char name[50];
  351.     
  352.     strcpy(name, emacs_com[i]);
  353.  
  354.     n = 0;
  355.     label_string = XmStringCreateLtoR(name, charset);
  356.     XtSetArg (args[n], XmNlabelString, label_string);  n++;
  357.     button = XmCreatePushButtonGadget (row_column, name, args, n);
  358.     XtManageChild (button);
  359.     XmStringFree (label_string);
  360.  
  361.  
  362.     XtAddCallback (button, XmNarmCallback,SelectEmacsCommand, NULL);
  363.  
  364. /*
  365.     n = 0;
  366.     label_string = XmStringCreateLtoR(name, charset);
  367.     XtSetArg (args[n], XmNlabelString, label_string);  n++;
  368.     button = XmCreatePushButtonGadget (row_column, name, args, n);
  369.     XtManageChild (button);
  370.     XtAddCallback (button, XmNarmCallback,SelectEmacsString, NULL);
  371.     XmStringFree (label_string);
  372. */
  373.  
  374.   };
  375.  
  376. }
  377.  
  378. void Quit(wid, cli_data, call_data)
  379.      Widget         wid;
  380.      caddr_t        cli_data;
  381.      caddr_t        call_data;
  382. {
  383.   exit(0);
  384. }
  385.  
  386. SendKeySym(key_s,type,mask)
  387.      unsigned int
  388.        key_s,
  389.        type,
  390.        mask;
  391. {
  392.   XKeyEvent key;
  393.   
  394.   key.state = mask;
  395.   key.type = type;
  396.   key.keycode = XKeysymToKeycode(dsp, key_s); 
  397.   XSendEvent(dsp,des_w, True, 
  398.          (KeyPressMask|KeyReleaseMask), (XEvent *) &key);
  399. }
  400.  
  401.  
  402. void SelectEmacsString(wid, cli_data, call_data)
  403.      Widget         wid;
  404.      caddr_t        cli_data;
  405.      caddr_t        call_data;
  406. {
  407.   register int 
  408.     n;
  409.   Arg
  410.     args[MAX_ARGS];
  411.   char
  412.     *name;
  413.  
  414.   XmString 
  415.     name_string;
  416.   
  417.   n = 0;
  418.   XtSetArg (args[n], XmNlabelString, &name_string); n++;
  419.   XtGetValues (wid, args, n);
  420.   XmStringGetLtoR (name_string, charset, &name);
  421.   
  422.   if (name) SendString(name);
  423.  
  424. }
  425.  
  426.  
  427. void SendString(name)
  428.      char     *name;
  429. {
  430. #define Case1(a,b) case a: SendKeySym(b, KeyPress, 0); break;
  431.   char       ctmp[2] = { NULL, NULL } ;   /* make sure 2nd char is NULL */
  432.   register   int i;
  433.  
  434.  
  435.   for(i=0; i<strlen(name); i++){
  436.     ctmp[0] = name[i];
  437.     if (isalpha(ctmp[0])|| (isdigit(ctmp[0])) )
  438.       SendKeySym(XStringToKeysym(ctmp), KeyPress , 0 );
  439.     else if (isupper(ctmp[0])) 
  440.       SendKeySym(XStringToKeysym(ctmp), KeyPress , ShiftMask );
  441.     else 
  442.       switch (ctmp[0]) {
  443.     Case1('-', XK_minus);
  444.     Case1(' ', XK_space);
  445.     Case1('+', XK_plus);
  446.       };
  447.  
  448.   };
  449.  
  450. #undef Case1
  451.  
  452. }
  453.  
  454. void SelectEmacsCommand( wid, cli_data, call_data )
  455.      Widget         wid;
  456.      caddr_t        cli_data;
  457.      caddr_t        call_data;
  458. {
  459.   register int 
  460.     n;
  461.   Arg
  462.     args[MAX_ARGS];
  463.   char
  464.     *name;
  465.  
  466.   XmString 
  467.     name_string;
  468.   
  469.   n = 0;
  470.   XtSetArg (args[n], XmNlabelString, &name_string); n++;
  471.   XtGetValues (wid, args, n);
  472.   XmStringGetLtoR (name_string, charset, &name);
  473.  
  474.   if (name) SendCommand(name);
  475.  
  476. }
  477.  
  478. void SendCommand(name)
  479.      char      *name;
  480. {
  481.   XKeyEvent  key;
  482.   char       ctmp[2] = { NULL,NULL };   /* make sure 2nd char is NULL */
  483.   register int i;
  484.  
  485.   key.state = 0; /* no control key */
  486.   key.type = KeyPress;
  487.  
  488.   /* send a ECS and X key first */
  489.   SendKeySym(XK_Escape,KeyPress, 0);
  490.   SendKeySym(XK_x,KeyPress, 0);
  491.  
  492.   SendString(name);
  493.  
  494.   /* Last the return Key */
  495.   SendKeySym(XK_Return,KeyPress, 0);
  496.   
  497. }
  498.  
  499.  
  500. get_emacs_win()
  501. {
  502.   checkwin(RootWindow(dsp,scr ));
  503. }
  504.  
  505.  
  506. checkwin(w)
  507.      Window w;
  508. {
  509.   Window root, parent;
  510.   unsigned int nchildren;
  511.   Window *children = NULL;
  512.   Status status;
  513.   int i;
  514.   char *name = NULL;
  515.   
  516.   if (XFetchName(dsp,w, &name)) {
  517.     if (!strncmp(name,EMACS,4) ) {
  518.       des_w = w;
  519.       return;
  520.     }
  521.   }
  522.   if (name) free(name);
  523.  
  524.   if (!XQueryTree(dsp,w, &root, &parent, &children, &nchildren))
  525.     return;
  526.  
  527.   for (i =0; i < nchildren; i++) 
  528.     checkwin(children[i]);
  529.  
  530. }
  531.  
  532.  
  533. \End\Of\Shar\
  534. else
  535.   echo "will not over write ./x_emacs_helper.c"
  536. fi
  537. if `test ! -s ./x_emacs_helper.h`
  538. then
  539. echo "writing ./x_emacs_helper.h"
  540. cat > ./x_emacs_helper.h << '\End\Of\Shar\'
  541. char *emacs_com[] = 
  542. {
  543. "abbrev-mode",  "abbrev-prefix-mark",
  544. "abort-recursive-edit",  "add-change-log-entry",
  545. "add-change-log-entry-other-window",  "add-global-abbrev",
  546. "add-mode-abbrev",  "add-name-to-file",
  547. "advertised-undo",  "append-next-kill",
  548. "append-to-buffer",  "append-to-file",
  549. "append-to-register",  "apropos",
  550. "auto-fill-mode",  "auto-save-mode",
  551. "back-to-indentation",  "backtrace",
  552. "backward-char",  "backward-delete-char",
  553. "backward-delete-char-untabify",  "backward-kill-paragraph",
  554. "backward-kill-sentence",  "backward-kill-sexp",
  555. "backward-kill-word",  "backward-list",
  556. "backward-page",  "backward-paragraph",
  557. "backward-sentence",  "backward-sexp",
  558. "backward-to-indentation",  "backward-up-list",
  559. "backward-word",  "basic-save-buffer",
  560. "beginning-of-buffer",  "beginning-of-defun",
  561. "beginning-of-line",  "buffer-enable-undo",
  562. "buffer-menu",  "bury-buffer",
  563. "byte-compile-file",  "byte-recompile-directory",
  564. "c-indent-command",  "c-macro-expand",
  565. "c-mode",  "calendar",
  566. "call-last-kbd-macro",  "cancel-debug-on-entry",
  567. "capitalize-region",  "capitalize-word",
  568. "cd",  "center-line",
  569. "center-paragraph",  "center-region",
  570. "clear-rectangle",  "command-apropos",
  571. "command-history-mode",  "compare-windows",
  572. "compile",  "convert-mocklisp-buffer",
  573. "copy-file",  "copy-last-shell-input",
  574. "copy-rectangle-to-register",  "copy-region-as-kill",
  575. "copy-to-buffer",  "copy-to-register",
  576. "count-lines-page",  "count-lines-region",
  577. "count-matches",  "csh",
  578. "ctl-x-4-prefix",  "dabbrev-expand",
  579. "date",  "debug-on-entry",
  580. "define-abbrevs",  "define-global-abbrev",
  581. "define-mail-alias",  "define-mode-abbrev",
  582. "delete-backward-char",  "delete-blank-lines",
  583. "delete-char",  "delete-file",
  584. "delete-horizontal-space",  "delete-indentation",
  585. "delete-matching-lines",  "delete-non-matching-lines",
  586. "delete-other-windows",  "delete-rectangle",
  587. "delete-region",  "delete-window",
  588. "delete-windows-on",  "describe-bindings",
  589. "describe-copying",  "describe-distribution",
  590. "describe-function",  "describe-key",
  591. "describe-key-briefly",  "describe-mode",
  592. "describe-no-warranty",  "describe-syntax",
  593. "describe-variable",  "digit-argument",
  594. "dired",  "dired-other-window",
  595. "disable-command",  "disassemble",
  596. "display-time",  "dissociated-press",
  597. "do-auto-save",  "doctor",
  598. "down-list",  "down-open-tab",
  599. "downcase-region",  "downcase-word",
  600. "edit-abbrevs",  "edit-abbrevs-mode",
  601. "edit-abbrevs-redefine",  "edit-options",
  602. "edit-picture",  "edit-tab-stops",
  603. "edit-tab-stops-note-changes",  "edt-emulation-on",
  604. "electric-buffer-list",  "electric-c-brace",
  605. "electric-c-semi",  "electric-c-terminator",
  606. "electric-command-history",  "emacs-lisp-mode",
  607. "emacs-version",  "enable-command",
  608. "end-kbd-macro",  "end-of-buffer",
  609. "end-of-defun",  "end-of-line",
  610. "enlarge-window",  "enlarge-window-horizontally",
  611. "eval-current-buffer",  "eval-defun",
  612. "eval-expression",  "eval-last-sexp",
  613. "eval-print-last-sexp",  "eval-region",
  614. "exchange-dot-and-mark",  "exchange-point-and-mark",
  615. "execute-extended-command",  "exit-minibuffer",
  616. "exit-recursive-edit",  "expand-abbrev",
  617. "expand-region-abbrevs",  "fase",
  618. "fill-individual-paragraphs",  "fill-paragraph",
  619. "fill-region",  "fill-region-as-paragraph",
  620. "find-alternate-file",  "find-file",
  621. "find-file-other-window",  "find-file-read-only",
  622. "find-tag",  "find-tag-other-window",
  623. "fixup-whitespace",  "flush-lines",
  624. "fortran-mode",  "forward-char",
  625. "forward-line",  "forward-list",
  626. "forward-page",  "forward-paragraph",
  627. "forward-sentence",  "forward-sexp",
  628. "forward-to-indentation",  "forward-word",
  629. "ftp-find-file",  "ftp-write-file",
  630. "fundamental-mode",  "garbage-collect",
  631. "gdb",  "global-set-key",
  632. "global-unset-key",  "gnus",
  633. "goto-char",  "goto-line",
  634. "grep",  "hanoi",
  635. "help-for-help",  "help-with-tutorial",
  636. "how-many",  "indent-according-to-mode",
  637. "indent-c-exp",  "indent-code-rigidly",
  638. "indent-for-comment",  "indent-for-tab-command",
  639. "indent-new-comment-line",  "indent-region",
  640. "indent-relative",  "indent-relative-maybe",
  641. "indent-rigidly",  "indent-sexp",
  642. "indent-to",  "indent-to-column",
  643. "indented-text-mode",  "inferior-lisp-mode",
  644. "info",  "insert-abbrevs",
  645. "insert-buffer",  "insert-file",
  646. "insert-kbd-macro",  "insert-parentheses",
  647. "insert-register",  "interrupt-shell-subjob",
  648. "inverse-add-global-abbrev",  "inverse-add-mode-abbrev",
  649. "isearch-backward",  "isearch-backward-regexp",
  650. "isearch-forward",  "isearch-forward-regexp",
  651. "ispell-buffer",  "ispell-complete-word",
  652. "ispell-region",  "ispell-word",
  653. "just-one-space",  "justify-current-line",
  654. "kbd-macro-query",  "kcl",
  655. "keep-lines",  "keyboard-quit",
  656. "kill-all-abbrevs",  "kill-buffer",
  657. "kill-comment",  "kill-compilation",
  658. "kill-emacs",  "kill-grep",
  659. "kill-line",  "kill-local-variable",
  660. "kill-output-from-shell",  "kill-paragraph",
  661. "kill-rectangle",  "kill-region",
  662. "kill-ring-save",  "kill-sentence",
  663. "kill-sexp",  "kill-shell-input",
  664. "kill-shell-subjob",  "kill-some-buffers",
  665. "kill-word",  "latex-mode",
  666. "ledit-mode",  "lisp-complete-symbol",
  667. "lisp-defaults",  "lisp-indent-line",
  668. "lisp-interaction-mode",  "lisp-mode",
  669. "lisp-send-defun",  "lisp-send-defun-and-go",
  670. "list-abbrevs",  "list-buffers",
  671. "list-command-history",  "list-directory",
  672. "list-matching-lines",  "list-options",
  673. "list-processes",  "list-tags",
  674. "load-file",  "load-library",
  675. "local-set-key",  "local-unset-key",
  676. "lpr-buffer",  "lpr-region",
  677. "mail",  "mail-other-window",
  678. "make-command-summary",  "make-local-variable",
  679. "make-symbolic-link",  "make-variable-buffer-local",
  680. "manual-entry",  "mark-c-function",
  681. "mark-defun",  "mark-end-of-sentence",
  682. "mark-page",  "mark-paragraph",
  683. "mark-sexp",  "mark-whole-buffer",
  684. "mark-word",  "mh-defaults",
  685. "mh-rmail",  "mh-smail",
  686. "minibuffer-complete",  "minibuffer-complete-and-exit",
  687. "minibuffer-complete-word",  "minibuffer-completion-help",
  688. "modify-syntax-entry",  "modula-2-mode",
  689. "move-past-close-and-reindent",  "move-to-window-line",
  690. "name-last-kbd-macro",  "narrow-to-page",
  691. "narrow-to-region",  "negative-argument",
  692. "newline",  "newline-and-indent",
  693. "news-post-news",  "next-complex-command",
  694. "next-error",  "next-file",
  695. "next-line",  "nntp",
  696. "normal-mode",  "not-case-fold",
  697. "not-modified",  "nroff-mode",
  698. "obj",  "occur",
  699. "occur-mode-goto-occurrence",  "open-dribble-file",
  700. "open-line",  "open-rectangle",
  701. "open-termscript",  "orient-window",
  702. "other-window",  "outline-mode",
  703. "overwrite-mode",  "picture-mode",
  704. "plain-tex-mode",
  705. "point-to-register",  "postnews",
  706. "prepend-to-buffer",  "prepend-to-register",
  707. "previous-complex-command",  "previous-line",
  708. "print-buffer",  "print-region",
  709. "prolog-mode",  "psychoanalyze-pinhead",
  710. "pwd",  "query-replace",
  711. "query-replace-regexp",  "quit-shell-subjob",
  712. "quoted-insert",  "re-search-backward",
  713. "re-search-forward",  "read-abbrev-file",
  714. "recenter",  "recover-file",
  715. "recursive-edit",  "redraw-display",
  716. "register-to-point",  "reindent-then-newline-and-indent",
  717. "rename-buffer",  "rename-file",
  718. "repeat-complex-command",  "repeat-matching-complex-command",
  719. "replace-buffer-in-windows",  "replace-regexp",
  720. "replace-string",  "revert-buffer",
  721. "rmail",  "rmail-input",
  722. "rnews",  "rotate-yank-pointer",
  723. "run-lisp",  "run-prolog",
  724. "run-scheme",  "save-buffer",
  725. "save-buffers-kill-emacs",  "save-some-buffers",
  726. "scheme-mode",  "scribe-mode",
  727. "scroll-down",  "scroll-left",
  728. "scroll-other-window",  "scroll-right",
  729. "scroll-up",  "search-backward",
  730. "search-forward",  "self-insert-and-exit",
  731. "self-insert-command",  "send-string-to-process",
  732. "sendnews",  "server-start",
  733. "set-comment-column",  "set-fill-column",
  734. "set-fill-prefix",  "set-goal-column",
  735. "set-gosmacs-bindings",  "set-mark-command",
  736. "set-selective-display",  "set-variable",
  737. "set-visited-file-name",  "shell",
  738. "shell-beginning-of-line",  "shell-command",
  739. "shell-command-on-region",  "shell-filename-expand",
  740. "shell-history-search-backward",  "shell-history-search-forward",
  741. "shell-list-history",  "shell-mode",
  742. "shell-next-command",  "shell-previous-command",
  743. "shell-push-input",  "shell-send-eof",
  744. "shell-send-input",  "show-output-from-shell",
  745. "shrink-window",  "shrink-window-horizontally",
  746. "sort-columns",  "sort-fields",
  747. "sort-lines",  "sort-numeric-fields",
  748. "sort-pages",  "sort-paragraphs",
  749. "sort-regexp-fields",  "spell-buffer",
  750. "spell-region",  "spell-string",
  751. "spell-word",  "split-line",
  752. "split-window",  "split-window-horizontally",
  753. "split-window-vertically",  "start-kbd-macro",
  754. "stop-shell-subjob",  "suspend-emacs",
  755. "switch-to-buffer",  "switch-to-buffer-other-window",
  756. "tab-to-tab-stop",  "tabify",
  757. "tags-apropos",  "tags-loop-continue",
  758. "tags-query-replace",  "tags-search",
  759. "telnet",  "terminal-emulator",
  760. "tex-mode",  "texinfo-format-buffer",
  761. "texinfo-format-region",  "texinfo-mode",
  762. "text-defaults",  "text-mode",
  763. "toggle-read-only",  "top-level",
  764. "transpose-chars",  "transpose-lines",
  765. "transpose-paragraphs",  "transpose-sentences",
  766. "transpose-sexps",  "transpose-words",
  767. "undefined",  "underline-region",
  768. "undo",  "unexpand-abbrev",
  769. "universal-argument",  "untabify",
  770. "ununderline-region",  "up-list",
  771. "upcase-region",  "upcase-word",
  772. "vi-mode",  "view-buffer",
  773. "view-emacs-news",  "view-file",
  774. "view-lossage",  "view-register",
  775. "vip-mode",  "visit-tags-table",
  776. "what-cursor-position",  "what-line",
  777. "what-page",  "where-is",
  778. "widen",  "word-search-backward",
  779. "word-search-forward",  "write-abbrev-file",
  780. "write-file",  "write-region",
  781. "x-flip-color",  "x-flush-mouse-queue",
  782. "x-new-display",  "x-set-background-color",
  783. "x-set-bell",  "x-set-big-font",
  784. "x-set-border-color",  "x-set-border-width",
  785. "x-set-cursor-color",  "x-set-font",
  786. "x-set-foreground-color",  "x-set-huge-font",
  787. "x-set-internal-border-width",  "x-set-mouse-color",
  788. "x-set-small-font",  "x-store-cut-buffer",
  789. "yank",  "yank-pop",
  790. "yank-rectangle",  "yow",
  791. "zap-to-char",
  792. NULL, NULL};
  793. \End\Of\Shar\
  794. else
  795.   echo "will not over write ./x_emacs_helper.h"
  796. fi
  797. echo "Finished archive 1 of 1"
  798. exit
  799.  
  800.  
  801.  
  802.  
  803. dan
  804. -----------------------------------------------------------
  805.             O'Reilly && Associates
  806.         argv@sun.com / argv@ora.com
  807.        632 Petaluma Ave, Sebastopol, CA 95472 
  808.      800-338-NUTS, in CA: 800-533-NUTS, FAX 707-829-0104
  809.     Opinions expressed reflect those of the author only.
  810.